AddSimPostInit(function ()
    TheWorld:ListenForEvent("ms_newplayerspawned",function (inst,data)
        inst:DoTaskInTime(0,function()
            -- S_SURTR:declare('newplayer!')
            for _,v in pairs(AllPlayers) do
                if data and data.prefab == 'surtr' and v.GUID == data.GUID then
                    local wp = v.components.inventory and v.components.inventory:FindItem(function (item)
                        return item.prefab and item.prefab == 'surtr_laevatain'
                    end)
                    if wp then
                        ---@class ent
                        ---@field surtr_laevatain_owner_userid string # 武器绑定的玩家userid
                        ---@field surtr_laevatain ent # 绑定的武器

                        wp.surtr_laevatain_owner_userid = v.userid
                        v.surtr_laevatain = wp
                    end
                end
            end
        end)
    end)
end)

